package cn.com.cifi.mars.common.enums;

/**
 * @author plx
 */
public enum LocalCommandEnum {
    /**
     * 去化率报表缓存
     */
    FLUSH_REMOVAL_REPORT_CACHE("flush:removal","刷新去化率报表缓存"),
    CLEAR_REMOVAL_REPORT_CACHE("clear:removal","清空去化率报表缓存")
    ;

    private String code;

    private String name;

    LocalCommandEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static LocalCommandEnum getByCode(String code){
        for (LocalCommandEnum localCommandEnum : values()) {
            if (localCommandEnum.getCode().equals(code)){
                return localCommandEnum;
            }
        }
        return null;
    }
}
